import React, {Component} from 'react'
import {StackNavigator} from 'react-navigation'

import WelcomePage from './WelcomePage'
import HomePage from './HomePage'
import Login from './Login'
import TreeList from './TreeList'
import ManageInfo from './ManageInfo'
import Sas from './Sas'
import Info from './Infomation'

function setup() {
    //进行一些初始化配置
    const MyApp = StackNavigator({
            Welcome: {
                screen: WelcomePage,
                navigationOptions: {
                    header: null
                }
            },
            Home: {
                screen: HomePage,
                navigationOptions: {
                    header: null
                }
            },
            Login: {
                screen: Login,
                navigationOptions: {
                    header: null,
                }
            },
            Sas: {
                screen: Sas,
                navigationOptions: {
                    // header: null,
                }
            },
            TreeList: {
                screen: TreeList,
            },
            ManageInfo: {
                screen: ManageInfo,
            },
            Info: {
                screen: Info,
            },
        },
        {
            initialRouteName: "Home",
            navigationOptions: {
                gesturesEnabled: true,
                headerStyle: {
                    backgroundColor: "#271770",
                    height: 56,
                },
                headerTintColor: "#fff"
            }
        });

    return <MyApp/>;
}

module.exports = setup;